/** 
 * Copyright (C), 2010-2012, AIYOU Software Co.,Ltd. ALL RIGHTS RESERVED. 
 * File name:Test.java
 * Version:1.0
 * Date:2012-1-14
 * Description: 
 * author:whh 
 */
package com.tietiao.webservice.renren;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class Test {
	public static void main(String[] args) throws UnsupportedEncodingException {
	      String redirectUri=URLEncoder.encode("http://www.tietiao.com/demo4web/rr_login", "UTF-8");
	        //"https://graph.renren.com/oauth/authorize"连接的参数如下：
	        StringBuffer params=new StringBuffer();
	        params.append("client_id=").append("176719");
	        params.append("&").append("response_type=").append("code");
	        params.append("&").append("redirect_uri=").append(redirectUri);
	        params.append("&").append("display=").append("page");
	        //操作的权限,根据具体需求自行选择
	        params.append("&").append("scope=").append("read_user_status,status_update,read_user_feed,publish_feed,photo_upload");
	        params.append("&").append("x_renew=").append("true"); //设置每次使用人人连接用户都需要登陆
	        System.out.println("https://graph.renren.com/oauth/authorize?"+params.toString());
	}
}
